home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2002 January / january_2002.iso / Piposh Special / Piposh / FRITZ1.DXR / 00075_foemov.ls < prev    next >
Encoding:
Text File  |  2004-12-06  |  2.6 KB  |  57 lines

  1. on foemov stnd, wlk, pnch, hit1, hit2, myx, myy, myppl, mymnv, myfoes, faldwn, getup
  2.   global ppl, foes, mnv
  3.   if getAt(foes, myfoes) = wlk then
  4.     if (getAt(mnv, mymnv) > 1) and ((abs(the locH of sprite getAt(ppl, 1) - the locH of sprite getAt(ppl, myppl)) > 120) or (abs(the locV of sprite getAt(ppl, 1) - the locV of sprite getAt(ppl, myppl)) > 40)) then
  5.       if sprite(getAt(ppl, myppl)).flipH = 1 then
  6.         set the locH of sprite getAt(ppl, myppl) to the locH of sprite getAt(ppl, myppl) + myx
  7.       else
  8.         set the locH of sprite getAt(ppl, myppl) to the locH of sprite getAt(ppl, myppl) - myx
  9.       end if
  10.       if (the locV of sprite getAt(ppl, myppl) + 13) < the locV of sprite getAt(ppl, 1) then
  11.         set the locV of sprite getAt(ppl, myppl) to the locV of sprite getAt(ppl, myppl) + myy
  12.       else
  13.         if (the locV of sprite getAt(ppl, myppl) - 13) > the locV of sprite getAt(ppl, 1) then
  14.           set the locV of sprite getAt(ppl, myppl) to the locV of sprite getAt(ppl, myppl) - myy
  15.         end if
  16.       end if
  17.       set the memberNum of sprite getAt(ppl, myppl) to member(the memberNum of sprite getAt(ppl, myppl) + 1, 1)
  18.       setAt(mnv, mymnv, getAt(mnv, mymnv) - 1)
  19.     else
  20.       set the member of sprite getAt(ppl, myppl) to member(stnd, 1)
  21.     end if
  22.   else
  23.     if getAt(foes, myfoes) = pnch then
  24.       set the memberNum of sprite getAt(ppl, myppl) to member(the memberNum of sprite getAt(ppl, myppl) + 1, 1)
  25.       setAt(mnv, mymnv, getAt(mnv, mymnv) - 1)
  26.       if getAt(mnv, mymnv) < 1 then
  27.         set the member of sprite getAt(ppl, myppl) to member(stnd, 1)
  28.         setAt(foes, myfoes, stnd)
  29.       end if
  30.     else
  31.       if getAt(foes, myfoes) = hit1 then
  32.         if getAt(mnv, mymnv) > 1 then
  33.           setAt(mnv, mymnv, getAt(mnv, mymnv) - 1)
  34.         else
  35.           set the member of sprite getAt(ppl, myppl) to member(stnd, 1)
  36.           setAt(foes, myfoes, stnd)
  37.         end if
  38.       else
  39.         if getAt(foes, myfoes) = hit2 then
  40.           setAt(mnv, mymnv, getAt(mnv, mymnv) - 1)
  41.           if getAt(mnv, mymnv) > faldwn then
  42.             set the memberNum of sprite getAt(ppl, myppl) to member(the memberNum of sprite getAt(ppl, myppl) + 1, 1)
  43.           else
  44.             if getAt(mnv, mymnv) < getup then
  45.               set the memberNum of sprite getAt(ppl, myppl) to member(the memberNum of sprite getAt(ppl, myppl) + 1, 1)
  46.               if getAt(mnv, mymnv) < 2 then
  47.                 set the member of sprite getAt(ppl, myppl) to member(stnd, 1)
  48.                 setAt(foes, myfoes, stnd)
  49.               end if
  50.             end if
  51.           end if
  52.         end if
  53.       end if
  54.     end if
  55.   end if
  56. end
  57.